/**
 * 
 */
package pl.softech.gpw.model;

import java.util.Date;

import jscl.gui.table.TableColumn;

/**
 * @author ssledz
 *
 */
public class FInstrument {

	public class RowView {
		
		@TableColumn(name="Date", order=0)   public Date    getDate() { return date; }
		@TableColumn(name="Name", order=1)   public String  getName() { return name; }
		@TableColumn(name="Open", order=2)   public Float   getOpen() { return open; }
		@TableColumn(name="Low", order=3)    public Float   getLow() { return low; }
		@TableColumn(name="High", order=4)   public Float   getHigh() { return high; }
		@TableColumn(name="Close", order=5)  public Float   getClose() { return close; }
		@TableColumn(name="Volume", order=6) public Integer getVolume() { return volume; }
	}
	
	private String name;
	private Date date;
	private float open;
	private float high;
	private float low;
	private float close;
	private int volume;
	
	private transient RowView rowView;
	
	public RowView getRowView() {
		if(rowView == null)
			rowView = new RowView();
		return rowView;
	}

	@Override
	public String toString() {
		return "FInstrument [name=" + name + ", date=" + date + ", open="
				+ open + ", high=" + high + ", low=" + low + ", close=" + close
				+ ", volume=" + volume + "]";
	}
	
	/* SETERS AND GETERS */
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	
	public float getOpen() {
		return open;
	}
	public void setOpen(float open) {
		this.open = open;
	}
	public float getHigh() {
		return high;
	}
	public void setHigh(float high) {
		this.high = high;
	}
	public float getLow() {
		return low;
	}
	public void setLow(float low) {
		this.low = low;
	}
	public float getClose() {
		return close;
	}
	public void setClose(float close) {
		this.close = close;
	}
	public int getVolume() {
		return volume;
	}
	public void setVolume(int volume) {
		this.volume = volume;
	}
	
}
